# !/usr/bin/env python3
# -*- coding: utf-8 -*-

from app import mail, config
from flask_mail import Message

__author__ = 'InG_byr'


def send_email(target, title, msg):
    """
    Send an email to someone
    :param target: list, the target of email
    :param title: str, the message's title
    :param msg: str, the message
    :return:
    """
    message = Message(subject=title, body=msg, sender=config.MAIL_USERNAME, recipients=target)
    mail.send(message)
